package reflectCus;

import reflectCus.annotations.AutoRunClass;
import reflectCus.annotations.AutoRunMethod;

import java.lang.annotation.Native;

@AutoRunClass
public class Animal {

    private    String name="小黄";
    private int age=3;
    public Animal(){

    }

    public Animal(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void sayHi(){
        System.out.println(name+":说...");
    }
    @AutoRunMethod(vectore = 2,runTimes = 5)
    private void eat(){
        System.out.println(name+"动物，吃：。。。");
    }
    public void play(String name){
        System.out.println(this.name+":玩"+name);
    }

    @Override
    public String toString() {
        return "Animal{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
